package edu.gznu.ics.fast.pulsar.service.userService;

import edu.gznu.ics.fast.pulsar.model.po.user.TdUserPO;
import edu.gznu.ics.fast.pulsar.model.vo.user.TdUserVO;

import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Set;

/**
 * Created by Y on 2016/7/29.
 */

public interface UserService {
    TdUserPO findUserByName(String userName);
    TdUserPO findUsernameById(Long userId);

    List<TdUserPO> findAllUser();

    /**
     * 根据用户名查找用户
     * @param userPO
     * @return TdUserPO
     */
    TdUserPO findUserByName(TdUserVO userPO);

    /**
     * 根据用户名查找其角色
     * @param userName
     * @return
     */
    Set<String> findRolesByUsername(String userName);
    TdUserPO updateUserInfo(TdUserVO user);
    void addUser( TdUserVO userVO);
    /**
     * 根据用户名查找其权限
     * @param userName
     * @return
     */
    Set<String> findPermissionsByUsername(String userName);
    void changePassword(Long userId, String newPassword) throws InvocationTargetException, IllegalAccessException;
}
